package com.worldtolearn.user.bu;

import javax.inject.Inject;
import javax.inject.Named;

import com.worldtolearn.user.dao.UserDAO;
import com.worldtolearn.user.entity.Role;
import com.worldtolearn.user.entity.User;

@Deprecated
@Named
public class RegisterBu {


//	@Inject
//	UserBu userBu;
//	
//	@Inject
//	RoleBu roleBu;
	
	
	@Inject
	UserDAO userDao;
	
	
	@Inject
	User user;
	
	@Inject
	Role role;
	
	
//	public UserBu getUserBu() {
//		return userBu;
//	}
//	public RoleBu getRoleBu() {
//		return roleBu;
//	}
	public User getUser() {
		return user;
	}
	public Role getRole() {
		return role;
	}

//	public void setUserBu(UserBu userBu) {
//		this.userBu = userBu;
//	}
//	public void setRoleBu(RoleBu roleBu) {
//		this.roleBu = roleBu;
//	}
	public void setUser(User user) {
		this.user = user;
	}
	public void setRole(Role role) {
		this.role = role;
	}

	
	public void createUser(User user) {	

		/*
		 *  transferer un USER avec un ROLE EN DUR !!!
		 */
//		userBu.create(user);
		System.out.println("RegisterBu - registerBU");
		userDao.create(user);
	}

	public UserDAO getUserDao() {
		return userDao;
	}
	public void setUserDao(UserDAO userDao) {
		this.userDao = userDao;
	}

	
}
